<template>
  <el-row>
    <el-col :span="24" class="my-col">
      <el-menu
        router
        default-active="2"
        class="admin-menu"
        @open="handleOpen"
        @close="handleClose"
        text-color="#fff"
        active-text-color="#196DB9">
        <el-menu-item index="1">
          <template slot="title">
            <i class="el-icon-doctor"></i>
            <span>基本信息</span>
          </template>
        </el-menu-item>
        <el-menu-item index="2">
          <i class="el-icon-department"></i>
          <span slot="title" @click="goChange">修改信息</span>
        </el-menu-item>
        <el-menu-item index="3">
          <i class="el-icon-record"></i>
          <span slot="title" >返回首页</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </el-row>
</template>

<script>
import HomePage from "../../../views/admin/HomePage";
export default {
  name: "AdminSideBar",
  computed:{
    routerOptions(){
      return this.$router.options.routes.find(item => {
        return item['path'] = '/';
      })['children']
    }
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  }
}
</script>
